package ie.dcu.spca.model.sql;

public class billSQL {

    public static String getBilListByLocation = "SELECT * FROM bill WHERE location='%s';";

    public static String getBilListByUserid = "SELECT * FROM bill WHERE user_id=%d;";

    public static String insertBill = "INSERT INTO bill VALUES(?,?,?,?,?,?);";

    public static String selectById = "SELECT * FROM bill WHERE id =%d;";

    public static String insertByBean = "INSERT INTO bill VALUES(?,?,?,?,?,?);";

    public static String deleteById = "UPDATE bill SET delete_at=? WHERE id=?;";

    public static String deleteByBean = "";

    public static String updateByBean = "UPDATE bill SET location=?,user_id=?,create_at=?,update_at=?,delete_at=? WHERE id=?;";

    public static String selectMaxId = "SELECT MAX(id) as max FROM bill;";

    public static String existById = "SELECT * FROM bill WHERE id=%d;";

    public static String isDeletedById = "SELECT * FROM bill WHERE id=%d AND delete_at==0;";

    public static String selectAllBean = "SELECT * FROM bill WHERE delete_at==0 ORDER BY create_at DESC;";
}
